from typing import List


class Solution:
    def singleNumbers(self, nums: List[int]) -> List[int]:
        exclusive = 0
        for i in nums:
            exclusive ^= i
        print(exclusive)
        div = 1
        while div & exclusive == 0:
            div <<= 1
        print(div)
        a = 0
        b = 0
        for i in nums:
            if i & div:
                a ^= i
                print('i=',i)
            else:
                b ^= i
        return a, b


if __name__ == '__main__':
    s = Solution()
    nums = [1,2,5,2]
    ans = s.singleNumbers(nums)
    print(ans)
